var https = require('https');
var url = 'http://10.1.61.101:7500/omp';
const repl = require('repl');

const replServer = repl.start({ prompt: '> ', eval: myEval, writer: myWriter });

function myEval(cmd, context, filename, callback) {
  callback(null, '键入 .help 查看命令');
}

//没有这个的时候输出会跟据类型有所不同
function myWriter(output) {
  return output;
}

replServer.defineCommand('build', {
  help: '打包',
  action(name) {
    this.lineParser.reset();
    this.bufferedCommand = '';
    

    this.displayPrompt();
  }
});

replServer.defineCommand('deploy', {
  help: '部署',
  action(name) {
    
    this.close()
  }
});

function loginJenkins() {

}

function downloadPackage() {

}

function loginOmp() {

}

function uploadPackage() {

}

function help() {
  console.log('Usage: .build 1          xxx')
  console.log('       .build 2          xxx')
}